// 首页的样式less文件
@import "common";

// @import 导入的意思 可以把一个样式文件导入另一个样式文件 要加空格
body {
    min-width: 320px;
    width: 15rem;
    margin: 0 auto;
    line-height: 1.5;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f2f2f2;

}

// 顶部搜索框
@baseFont: 50px;

.search-content {
    display: flex;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translate(-50%);
    width: 15rem;
    height: (88rem / @baseFont);
    background-color: #ffc001;
    z-index: 1;


    .classify {
        width: (44rem / @baseFont);
        height: (70rem / @baseFont);
        background: url(../images/classify.png) no-repeat;
        // 背景缩放
        background-size: (44rem / @baseFont) (70rem / @baseFont);
        margin: (11rem / @baseFont) (25rem / @baseFont) (7rem / @baseFont) (24rem / @baseFont);
    }

    .search {
        flex: 1;
        // background-color: purple;

        input {
            outline: none;
            border: 0;
            width: 100%;
            height: (66rem / @baseFont);
            border-radius: (33rem / @baseFont);
            background-color: #fff2cc;
            color: #646262;
            margin-top: (12rem / @baseFont);
            font-size: (25rem / @baseFont);
            padding-left: (55rem / @baseFont);
        }
    }

    .login {
        width: (75rem / @baseFont);
        height: (70rem / @baseFont);
        text-align: center;
        line-height: (70rem / @baseFont);
        // background-color: blue;
        margin: (10rem / @baseFont);
        font-size: (25rem / @baseFont);
        color: #fff;
    }
}

// banner部分
.banner {
    width: (750rem / @baseFont);
    height: (368rem / @baseFont);

    img {
        width: 100%;
        height: 100%;
    }
}

// 广告部分
.ad {
    display: flex;

    a {
        flex: 1;

        img {
            width: 100%;
        }
    }
}

// nav导航栏部分
nav {
    width: (750rem / @baseFont);

    a {
        float: left;
        width: (150rem / @baseFont);
        height: (140rem / @baseFont);
        text-align: center;

        img {
            display: block;
            width: (82rem / @baseFont);
            height: (82rem / @baseFont);
            margin: (10rem / @baseFont) auto 0;
        }

        span {
            display: block;
            margin-top: (10rem / @baseFont);
            font-size: (25rem / @baseFont);
            color: #333;
        }
    }
}

// 底部导航栏
.nav-bd {
    display: flex;
    width: (750rem / @baseFont);
    height: (120rem / @baseFont);
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%);
    background-color: rgb(241, 240, 240);


    a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        width: (150rem / @baseFont);
        height: (100rem / @baseFont);
        font-size: (18rem / @baseFont);
        color: #080808;
    }

    img {
        width: (48rem / @baseFont);
        height: (48rem / @baseFont);
    }
}

// 热销产品区
.sale {
    .sale-hd {
        margin-top: (300rem / @baseFont);
        width: (750rem / @baseFont);
        height: (60rem / @baseFont);
        font-size: (30rem / @baseFont);
        padding-left: (30rem / @baseFont);
    }

    ul {
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;

        li {

            width: (300rem / @baseFont);

            img {
                width: 100%;
            }
        }
    }
}